<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="flutter," />










<meta name="description" content="简介 采用Flutter的Cupertino风格封装一个tabbar控件，通过TabBarItemModel和简单的配置就能实现简单版本的TabBar使用  TabBar1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162">
<meta name="keywords" content="flutter">
<meta property="og:type" content="article">
<meta property="og:title" content="第三篇:Flutter基础之TabBar">
<meta property="og:url" content="http://yoursite.com/2019/05/09/第三篇-Flutter基础之TabBar/index.html">
<meta property="og:site_name" content="简·Work">
<meta property="og:description" content="简介 采用Flutter的Cupertino风格封装一个tabbar控件，通过TabBarItemModel和简单的配置就能实现简单版本的TabBar使用  TabBar1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2019-05-09T06:25:49.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="第三篇:Flutter基础之TabBar">
<meta name="twitter:description" content="简介 采用Flutter的Cupertino风格封装一个tabbar控件，通过TabBarItemModel和简单的配置就能实现简单版本的TabBar使用  TabBar1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2019/05/09/第三篇-Flutter基础之TabBar/"/>





  <title>第三篇:Flutter基础之TabBar | 简·Work</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">简·Work</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/05/09/第三篇-Flutter基础之TabBar/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Z4Kong">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/avatar.gif">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="简·Work">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">第三篇:Flutter基础之TabBar</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-05-09T10:02:18+08:00">
                2019-05-09
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/Flutter/" itemprop="url" rel="index">
                    <span itemprop="name">Flutter</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h3 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h3><blockquote>
<p>采用Flutter的Cupertino风格封装一个tabbar控件，通过TabBarItemModel和简单的配置就能实现简单版本的TabBar使用</p>
</blockquote>
<h3 id="TabBar"><a href="#TabBar" class="headerlink" title="TabBar"></a>TabBar</h3><figure class="highlight dart"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> <span class="string">'package:flutter/material.dart'</span>;</span><br><span class="line"><span class="keyword">import</span> <span class="string">'package:flutter/cupertino.dart'</span>;</span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">MyTabBarItemModel</span> </span>&#123;</span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">String</span> name;</span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">String</span> icon; <span class="comment">// 没选中图标</span></span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">String</span> activeIcon; <span class="comment">// 选中图标</span></span><br><span class="line"></span><br><span class="line">    MyTabBarItemModel(&#123;<span class="keyword">this</span>.name, <span class="keyword">this</span>.icon, <span class="keyword">this</span>.activeIcon&#125;);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">MyTabBar</span> <span class="keyword">extends</span> <span class="title">StatefulWidget</span> </span>&#123;</span><br><span class="line">    MyTabBar(</span><br><span class="line">        &#123;Key key,</span><br><span class="line">        <span class="keyword">this</span>.items,</span><br><span class="line">        <span class="keyword">this</span>.controllers,</span><br><span class="line">        <span class="keyword">this</span>.color,</span><br><span class="line">        <span class="keyword">this</span>.iconSize,</span><br><span class="line">        <span class="keyword">this</span>.fontSize,</span><br><span class="line">        <span class="keyword">this</span>.inactiveColor,</span><br><span class="line">        <span class="keyword">this</span>.activeColor&#125;)</span><br><span class="line">        : <span class="keyword">super</span>(key: key);</span><br><span class="line"></span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">List</span>&lt;MyTabBarItemModel&gt; items;</span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">List</span>&lt;Widget&gt; controllers;</span><br><span class="line">    <span class="keyword">final</span> Color color; <span class="comment">// tabbar背景颜色</span></span><br><span class="line">    <span class="keyword">final</span> <span class="built_in">double</span> iconSize; <span class="comment">// tabbaritem图片大小</span></span><br><span class="line">    <span class="keyword">final</span> fontSize; <span class="comment">// tabbaritem字体大小</span></span><br><span class="line">    <span class="keyword">final</span> Color inactiveColor; <span class="comment">// 没选中字体颜色</span></span><br><span class="line">    <span class="keyword">final</span> Color activeColor; <span class="comment">// 选中字体颜色</span></span><br><span class="line"></span><br><span class="line">    createState() =&gt; MyTabBarState();</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">MyTabBarState</span> <span class="keyword">extends</span> <span class="title">State</span>&lt;<span class="title">MyTabBar</span>&gt;</span></span><br><span class="line"><span class="class">        <span class="title">with</span> <span class="title">SingleTickerProviderStateMixin</span> </span>&#123;</span><br><span class="line">    <span class="keyword">var</span> views = &lt;BottomNavigationBarItem&gt;[];</span><br><span class="line"></span><br><span class="line">    <span class="keyword">void</span> createTabBarItems() &#123;</span><br><span class="line">        views.clear();</span><br><span class="line">        <span class="keyword">for</span> (<span class="built_in">int</span> i = <span class="number">0</span>; i &lt; widget.items.length; i++) &#123;</span><br><span class="line">            views.add(<span class="keyword">new</span> BottomNavigationBarItem(</span><br><span class="line">                icon: Image.asset(</span><br><span class="line">                    widget.items[i].icon,</span><br><span class="line">                    width: widget.iconSize,</span><br><span class="line">                    height: widget.iconSize,</span><br><span class="line">                ),</span><br><span class="line">                activeIcon: Image.asset(</span><br><span class="line">                    widget.items[i].activeIcon,</span><br><span class="line">                    width: widget.iconSize,</span><br><span class="line">                    height: widget.iconSize,</span><br><span class="line">                ),</span><br><span class="line">                title: Text(</span><br><span class="line">                    widget.items[i].name,</span><br><span class="line">                    style: TextStyle(</span><br><span class="line">                        fontSize: widget.fontSize,</span><br><span class="line">                    ),</span><br><span class="line">                ),</span><br><span class="line">            ));</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    <span class="meta">@override</span></span><br><span class="line">    Widget build(BuildContext context) &#123;</span><br><span class="line">        createTabBarItems();</span><br><span class="line">        <span class="comment">// <span class="doctag">TODO:</span> implement build</span></span><br><span class="line">        <span class="keyword">return</span> CupertinoPageScaffold(</span><br><span class="line">            child: CupertinoTabScaffold(</span><br><span class="line">            tabBar: CupertinoTabBar(</span><br><span class="line">                backgroundColor: widget.color,</span><br><span class="line">                items: views,</span><br><span class="line">                iconSize: widget.iconSize,</span><br><span class="line">                activeColor: widget.activeColor,</span><br><span class="line">                inactiveColor: widget.inactiveColor,</span><br><span class="line">                border: Border.all(</span><br><span class="line">                    color: Colors.grey[<span class="number">200</span>],</span><br><span class="line">                    width: <span class="number">1.0</span>,</span><br><span class="line">                    style: BorderStyle.solid,</span><br><span class="line">                ),</span><br><span class="line">            ),</span><br><span class="line">            tabBuilder: (BuildContext context, <span class="built_in">int</span> index) &#123;</span><br><span class="line">                <span class="keyword">return</span> <span class="keyword">null</span> != widget.controllers[index]</span><br><span class="line">                    ? widget.controllers[index]</span><br><span class="line">                    : Container();</span><br><span class="line">                &#125;,</span><br><span class="line">            ),</span><br><span class="line">        );</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="Demo"><a href="#Demo" class="headerlink" title="Demo"></a>Demo</h3><figure class="highlight dart"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">List</span>&lt;MyTabBarItemModel&gt; items = &lt;MyTabBarItemModel&gt;[</span><br><span class="line">    <span class="keyword">new</span> MyTabBarItemModel(</span><br><span class="line">        name: <span class="string">'首页'</span>,</span><br><span class="line">        icon: <span class="string">'images/HomePage.png'</span>,</span><br><span class="line">        activeIcon: <span class="string">'images/tabbar/HomePageSelected.png'</span>,</span><br><span class="line">    ),</span><br><span class="line">    <span class="keyword">new</span> MyTabBarItemModel(</span><br><span class="line">        name: <span class="string">'商城'</span>,</span><br><span class="line">        icon: <span class="string">'images/Project.png'</span>,</span><br><span class="line">        activeIcon: <span class="string">'images/tabbar/ProjectSelected.png'</span>,</span><br><span class="line">    ),</span><br><span class="line">    <span class="keyword">new</span> MyTabBarItemModel(</span><br><span class="line">        name: <span class="string">'消息'</span>,</span><br><span class="line">        icon: <span class="string">'images/Message.png'</span>,</span><br><span class="line">        activeIcon: <span class="string">'images/tabbar/MessageSelected.png'</span>,</span><br><span class="line">    ),</span><br><span class="line">    <span class="keyword">new</span> MyTabBarItemModel(</span><br><span class="line">        name: <span class="string">'购物车'</span>,</span><br><span class="line">        icon: <span class="string">'images/ShoppingCar.png'</span>,</span><br><span class="line">        activeIcon: <span class="string">'images/tabbar/ShoppingCarSelected.png'</span>,</span><br><span class="line">    ),</span><br><span class="line">    <span class="keyword">new</span> MyTabBarItemModel(</span><br><span class="line">        name: <span class="string">'我的'</span>,</span><br><span class="line">        icon: <span class="string">'images/Mine.png'</span>,</span><br><span class="line">        activeIcon: <span class="string">'images/tabbar/MineSelected.png'</span>,</span><br><span class="line">    ),</span><br><span class="line">];</span><br><span class="line"></span><br><span class="line"><span class="built_in">List</span>&lt;Widget&gt; controllers = &lt;Widget&gt;[</span><br><span class="line">    <span class="keyword">new</span> Container(child: <span class="keyword">new</span> Center(child: <span class="keyword">new</span> Text(<span class="string">'home'</span>),),),</span><br><span class="line">    <span class="keyword">new</span> Container(child: <span class="keyword">new</span> Center(child: <span class="keyword">new</span> Text(<span class="string">'shop'</span>),),),</span><br><span class="line">    <span class="keyword">new</span> Container(),</span><br><span class="line">    <span class="keyword">new</span> Container(),</span><br><span class="line">    <span class="keyword">new</span> Container(),</span><br><span class="line">];</span><br><span class="line"></span><br><span class="line"><span class="keyword">return</span> MaterialApp(</span><br><span class="line">    title: <span class="string">'Flutter TabBar Demo'</span>,</span><br><span class="line">    debugShowCheckedModeBanner: <span class="keyword">false</span>,</span><br><span class="line">    home: MyTabBar(</span><br><span class="line">        items: items,</span><br><span class="line">        controllers: controllers,</span><br><span class="line">        color: Colors.white,</span><br><span class="line">        iconSize: <span class="number">20.0</span>,</span><br><span class="line">        fontSize: <span class="number">12.0</span>,</span><br><span class="line">        inactiveColor: Colors.grey,</span><br><span class="line">        activeColor: Colors.red,</span><br><span class="line">    ),</span><br><span class="line">);</span><br></pre></td></tr></table></figure>
<h3 id="TODO"><a href="#TODO" class="headerlink" title="TODO"></a>TODO</h3><ul>
<li>小红点</li>
<li>item自定义</li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/flutter/" rel="tag"># flutter</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2019/01/03/第二篇-XcodeTool/" rel="next" title="第二篇:XcodeTool ">
                <i class="fa fa-chevron-left"></i> 第二篇:XcodeTool 
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zMjcwOC85MjY5"></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <p class="site-author-name" itemprop="name">Z4Kong</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">4</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          <div class="links-of-author motion-element">
            
          </div>

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#简介"><span class="nav-number">1.</span> <span class="nav-text">简介</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#TabBar"><span class="nav-number">2.</span> <span class="nav-text">TabBar</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Demo"><span class="nav-number">3.</span> <span class="nav-text">Demo</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#TODO"><span class="nav-number">4.</span> <span class="nav-text">TODO</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Z4Kong</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.3</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  
 <!-- 来必力City版安装代码 -->
<div id="lv-container" data-id="city" data-uid="MTAyMC8zMjcwOC85MjY5">
	<script type="text/javascript">
   (function(d, s) {
       var j, e = d.getElementsByTagName(s)[0];

       if (typeof LivereTower === 'function') { return; }

       j = d.createElement(s);
       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
       j.async = true;

       e.parentNode.insertBefore(j, e);
   })(document, 'script');
	</script>
<noscript> 为正常使用来必力评论功能请激活JavaScript</noscript>
</div>
<!-- City版安装代码已完成 -->
  












  





  

  

  

  
  

  

  

  

</body>
</html>
